package com.waltercedric.java.joomla.gridupdater.repository;

import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class ZipLoader {

	
	
	
	public List<ZipEntry> listContent(File file) {
		List<ZipEntry> list = new ArrayList<ZipEntry>();
		try {
			ZipFile zipFile = new ZipFile(file);
			Enumeration zipEntries = zipFile.entries();
			while (zipEntries.hasMoreElements()) {
				list.add((ZipEntry) zipEntries.nextElement());
			}

		} catch (IOException ex) {
			ex.printStackTrace();
		}

		return list;

	}

}
